package com.gagakuai.bpm.config.queue;

import com.gagakuai.bpm.common.constants.BpmMetaConstants;

import com.gagakuai.bpm.domian.wapper.DeadMessageWrapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedDeque;

/*
 * @program: bpm_server
 * @description: 本地队列配置
 * @author: houhong
 * @create: 2022-07-11 09:43
 */
@Configuration
public class LocalQueueConfig {


    /*
     * 配置死信队列
     */
    @Bean(name = BpmMetaConstants.DEAD_LOCAL_QUEUE_NAME)
    public Queue<DeadMessageWrapper> deadMessageEventQueue() {

        Queue<DeadMessageWrapper> deadMeassageQueue = new ConcurrentLinkedDeque<>();
        return deadMeassageQueue;
    }

}